package com.lct.param;

public class MethodParamTest4 {
    public static void main(String[] args) {
        //使用方法判断两个数组是否一致，返回false和true
        int[] a1 = null;
        int[] a2 = null;
        System.out.println(compare(a1, a2));





    }

    public static boolean compare(int[] arr1, int[] arr2){
        if(arr1 == null || arr2 == null)
            return false;

        if (arr1.length != arr2.length)
            return false;

        for (int i = 0; i < arr1.length; i++) {
            if(arr1[i] != arr2[i])
                return false;
        }

        return true;

    }
}
